package coba.mailing.procedure;

import org.apache.commons.mail.Email;
import org.apache.commons.mail.EmailException;

public class AddAllTo {

	public static void addAllTo(Email email, String tos) throws EmailException {

		if (tos.contains(",")) {
			for (String to : tos.split(",")) {
				email.addTo(to.trim());
			}
		}
		else
			email.addTo(tos.trim());

	}

}
